how to use functions in code